package com.itheima.mapperDome.mapper;

import com.itheima.pojo.Library;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface LibraryMapper {
    List<Library> selectAllLibrary();

    Library selectLibraryById(int id);

//    List<Library> selectByCondition(
//            @Param("title") String title,
//            @Param("min") int min,
//            @Param("max") int max
//    );
    List<Library> selectByCondition(Map map);

    void insertLibrary(Library library);

    int updateLibrary(Library library);

    void deleteLibraryById(int id);

    void deleteByIds(@Param("ids") int[] ids);

    @Select("select * from library where id = #{id}")
    Library selectLibraryByCon(int id);
}
